//转化后的消息体内容
export type MessageItem = {
  id: string;
  from: string; //消息发送人
  to: string;  //群组Id
  nick: string; //昵称
  avatar: string; //头像
  sequence: number; //消息序列id
  random: number; //随机串，5分钟内相同则认为重复
  priority: string; //优先级
  type: string; //类型
  time: number; //时间
  isRevoked?: boolean; //是否被撤回
  payload: Record<string, any>;
}

export type PendingMessage = {
  id: string;
  from: string; //消息发送方
  nick: string; //发送方的昵称
  operator: string; //消息操作方
  random: number; //重复标识
  body: Record<string, any>[]; //消息体
}

//对外的消息store
export interface Message {
  groupId: string;   //群ID，也是房间ID
  isSDKReady: boolean; //TIMSDK是否已初始化完成

  enterMsg: string, //进房消息
  notifyMsg: Record<string, any>, //系统通知消息
  msgList: MessageItem[];  //TIM已接收到的文本消息
  tuwenMsgList: MessageItem[];  //图文直播消息列表
}
